package org.chipu.shared.util.singletons;

public class OSUtils {
	private OSUtils() {/**/}

	public static boolean isWindows() {
		return System.getProperty("os.name").startsWith("Windows");
	}

	public static boolean isUnix() {
		return !isWindows();
	}

	public static Process runCommand(String cmd, boolean wait, boolean printStdOut, boolean printErrOut) {
		if (isWindows())
			return WindowsUtils.runCommand(cmd, wait, printStdOut, printErrOut);
		return LinuxUtils.runCommand(cmd, wait, printStdOut, printErrOut);
	}
}